<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%
    String context = jt.classic.system.ISystem.getContextPath();
  
    String serverPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<jsp:include page="../system/head.jsp"></jsp:include>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人桌面</title>
<!-- overrides to base library -->
<link rel="stylesheet" type="text/css" href="<%=context %>/resources/ext3/ux/css/Portal.css" />

    <!-- page specific -->
<link rel="stylesheet" type="text/css" href="<%=context %>/resources/ext3/examples/sample.css" />

<link rel="stylesheet" type="text/css" href="layout-browser.css"></link>

<script type="text/javascript" src="<%=context %>/resources/ext3/ux/Portal.js"></script>
<script type="text/javascript" src="<%=context %>/resources/ext3/ux/PortalColumn.js"></script>
<script type="text/javascript" src="<%=context %>/resources/ext3/ux/Portlet.js"></script>
<script type="text/javascript" src="<%=context %>/extframe/js/portal-grid.js"></script>
<script type="text/javascript" src="<%=context %>/resources/ext3/examples/shared/examples.js"></script>
</head>

<script type="text/javascript">
	var hyjyHtml = "";
	var tzggHtml = ""
	function initInfoArea(key,fun) {
	var url = context + '/app/Vinfo.do?method=infolistjason&key=' + key + '&size=7';

	Ext.Ajax.request({
				// 请求地址
				url : url,
				scriptTag : true,
				// 成功时回调
				success : function(response, options) {
					var json = response.responseText;
					var o = Ext.util.JSON.decode(json);

					if (o.success) {
						if (o.totalCount > 0) {
							var list = o.infoList;
							fun(list);
						}
					} else {
						return '[]';
						Ext.Msg.alert('提示', '获取栏目信息失败');
					}
				}
			});

}
	
	/**
	*获取会议纪要数据
	*/
	function getHyjy(list){
			 for (var one in list)
	    {
	
	        for(var key in list[one])
	
	        {
				if(key=="title"){
				
				hyjyHtml+= "&nbsp;<p>· <a href='"+context+"/app/Vinfo.do?method=viewinfo&id="+list[one].id+"' target='_blank' class='oaFont'>"+list[one].title + "</a></p>&nbsp;";
				
				}
	            
	
	        }
	
	    }
	    
	    Ext.getCmp("hyjy").body.update(hyjyHtml); 
	}
	
	/**
	*获取通知公告要数据
	*/
	function getTzgg(list){
			 for (var one in list)
	    {
	
	        for(var key in list[one])
	
	        {
				if(key=="title"){
				
				tzggHtml+= "&nbsp;<p>· <a href='"+context+"/app/Vinfo.do?method=viewinfo&id="+list[one].id+"' target='_blank' class='oaFont'>"+list[one].title + "</a></p>&nbsp;";
				
				}
	            
	
	        }
	
	    }
	    
	    Ext.getCmp("tzgg").body.update(tzggHtml);

	}
	
	
	
	
    Ext.onReady(function(){
    
        // NOTE: This is an example showing simple state management. During development,
        // it is generally best to disable state management as dynamically-generated ids
        // can change across page loads, leading to unpredictable results.  The developer
        // should ensure that stable state ids are set for stateful components in real apps.
        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
        var tools = [{
        id:'gear',
        handler: function(){
            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
        }
	    },{
	        id:'close',
	        handler: function(e, target, panel){
	            panel.ownerCt.remove(panel, true);
	        }
	    }];
	    
        var viewport = new Ext.Viewport({
            layout: 'border',
            items: [
				 
				{
                region: 'east',
                width: 70, // give east and west regions a width
                minSize: 70,
                maxSize: 400,
                margins: '0 0 0 0',
                border: false,
                layout: 'fit', // specify layout manager for items
                items:[{   
			        xtype : 'box',   
			        autoEl : {   
			            tag : 'div',   
			            children : [{   
			                tag : 'img',     
			                qtip : 'Image',   
			                src : context + '/extframe/images/download.png'
			            }, {   
			                tag : 'img',     
			                qtip : 'Image',   
			                src : context + '/extframe/images/msn.png'
			            },{   
			                tag : 'img',     
			                qtip : 'Image',   
			                src : context + '/extframe/images/nb.png'
			            },{   
			                tag : 'img',     
			                qtip : 'Image',   
			                src : context + '/extframe/images/clock.png'
			            }]   
			        }   
			    }]
            }, {
                region: 'west',
                width: 0,
                minSize: 0,
                maxSize: 10,
                border: false,
                margins: '0 0 0 0',
                items: []
            }, {
                xtype:'portal',
	            region:'center',
	            margins:'0 0 0 0',
                border: false,
                items: [{
                columnWidth:.35,
                style:'padding:10px 0 0 10px',
                items:[{
                    title: '<font class="oaFont">会议纪要</font>',
                    id : 'hyjy',
                    html: hyjyHtml
                },{
                    title: '<font class="oaFont">通知公告</font>',
                    id : 'tzgg',
                    html: tzggHtml
                }]
            },{
                columnWidth:.65,
                style:'padding:10px 0 0 10px',
                items:[{
                    title: '<font class="oaFont">待办事宜</font>',
                    layout:'fit',
                    items: new SampleGrid([0, 2, 3])
                }]
            }
            ]
            }]
        });
       
       
       
       initInfoArea('root_hyjy',getHyjy);
       initInfoArea('root_tzgg',getTzgg);
    });
    </script>
<body>
</body>
</html>
